<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>查询订单</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/select_orders.css">
	
<script type="text/javascript">
	
		function firstpage(){
			
			
			window.location.href="pageFirst2.do";
		}
		
		function lastpage(){
			
			window.location.href="pageLast2.do";
		}
		
		function uppage(){
			var nowPage=document.getElementById("page_value").value;
			
			window.location.href="pageUp2.do?nowPage="+nowPage;
		}
		
		function downpage(){
			var nowPage=document.getElementById("page_value").value;
			
			window.location.href="pageDown2.do?nowPage="+nowPage;
		}
	
		function yesno(){
			var c=confirm("确定删除");
			
				return c;		
		}
	</script>

  </head>
  
  <body>
  	<div class="div_all">
  		<div class="div_1">
  				<div style="position: absolute;">
  				
  			<!--判断是否登录-->
			<%-- <c:if test="${username1!=null}">
				<span style="color:red;">用户名: ${username1}</span>
			</c:if>
			<c:if test="${username1==null}">
				<a href="qiehuanUser.do" style="text-decoration: none;color:red;">亲，请登入</a>
			</c:if></div> --%>
			<!-- <div class="div_menu">
				<a href="add_goods_showtype.do" class="a_menu">添加商品 </a>
  				<a href="show_goods.do" class="a_menu">查询商品 </a>
  				<a href="add_type.do" class="a_menu">类别管理 </a>
  				<a href="show_ads.do" class="a_menu">广告维护 </a>
  				<a href="zhuce.jsp" class="a_menu">注册账号 </a>
  				<a href="qiehuanUser.do" class="a_menu">切换账号 </a>
  				<a href="select_orders.do" class="a_menu">订单查询 </a>
  				<a href="go_tongji.do" class="a_menu">销售统计 </a>
			</div> -->
  			</div>
  		</div>
  		
  		<div class="div_2">
	  		<div class="div_show">
	  		
	  			<!--搜索  -->
				<div class="div_sousuo">
					<form action="select_orders.do" method="post">
						<input type="text" class="input1" name="name" placeholder="商品名称"/>
						<input type="submit" class="button1" value="搜索" />
					</form>
				</div>
			    <table class="table_class">
			    	<tr >
			    		<td width="300px" height="40px">商品详情</td>
			    		<td width="200px" height="40px">尺寸</td>
			    		<td width="200px" height="40px">颜色</td>
			    		<td width="200px" height="40px">数量</td>
			    		<td width="200px" height="40px">共计</td>
			    		<td width="200px" height="40px">姓名</td>
			    		<td width="200px" height="40px">性别</td>
			    		<td width="200px" height="40px">电话</td>
			    		<td width="200px" height="40px">地址</td>
			    		<td width="200px" height="40px">时间</td>
			    		<td width="200px" height="40px">订单号</td>
			    		<td width="300px" height="40px">确认发货</td>
			    	</tr>
			    	
			    	<!--显示订单详情-->
			    	<c:forEach items="${oList}" var="orders">
				    	<tr>
				    		<td>${orders.details}</td>
				    		<td>${orders.size}</td>
				    		<td>${orders.color}</td>
				    		<td>${orders.num}</td>
				    		<td>${orders.all_price}</td>
				    		<td>${orders.name}</td>
				    		<td>${orders.sex}</td>
				    		<td>${orders.phone}</td>
				    		<td>${orders.address}</td>
				    		<td>${orders.date}&nbsp;${goods.time}</td>
				    		<td>${orders.order_number}</td>
				    		<td>${orders.is_fh}</td>
				    		<td width="100px" height="40px"><a onclick="return yesno()" href="delete_orders.do?id=${orders.id}" class="goods_delete">取消订单</a><td >
				    		<td width="100px" height="40px"><a href="getOrderById.do?id=${orders.id}" class="goods_delete">修改订单</a><td >
				    		<td width="100px" height="40px"><a href="qrfh.do?id=${orders.id}" class="goods_delete">确认发货</a><td >
				    	</tr>
			    	</c:forEach>
			    	
			    	<tr>
			    		<td></td>
			    		<td><input type="button" value="首页" onclick="firstpage()"></td>
			    		<td></td>
			    		<td><input type="button" value="上一页" onclick="uppage()"></td>
			    		<td><input type="button" value="下一页" onclick="downpage()"></td>
			    		<td></td>
			    		<td><input type="button" value="尾页" onclick="lastpage()"></td>
			    		
			    	</tr>
			   
			    </table>
			    <input type="hidden" id="page_value" value="${page.nowpage}"/>
		    </div>
	    </div>
    </div>
  </body>
</html>